﻿@model WebVideo.EntityCompany
@{
    ViewBag.Title = "Liên hệ";
}


<div class="inner-container" id="inner-container" style="width:8000px">
       <div class="wrap-widget">
            	<div class="inner-widget _6">
                	<h1>Liên hệ</h1>
                    <div class="widget _2x3 phone bg-color-MediumSeaGreen">
                    	 @{
                                if (System.Web.HttpContext.Current.Request.Cookies["userId"] != null)
                                {
                                      @Html.Action("AdminSupport", "NSiteInfo", new {UserName= Request.Cookies["userId"].Value})
                                }
                                else
                                {
                                   <br /><h4>Bạn vui lòng đăng nhập trước khi liên hệ với hệ thống hỗ trợ !</h4>
                                }
                                }
                    </div><!--/ .widget-->
                    <div class="widget _3x1 phone">
                    	<div class="widget-content">
                          @Html.Action("GetCompany", "NSiteInfo")
                        </div><!--/ .widget-content-->
                    </div><!--/ .widget-->
                    <div class="widget _3x2 phone  bg-color-grayLight">
                    	<div id="maps">
                        	
                        </div><!--/ #maps-->
                    </div><!--/ .widget-->
                    
                </div><!--/ .inner-widget-->
            </div><!--/ .wrap-widget -->     
</div><!--/ .inner-container-->

@section occasionalScripts {
    <script type="text/javascript">document.body.className = 'no-js'</script>
 <script type="text/javascript" src="@Url.Content("~/Content/cssFrontEnd/js/jquery.min.js")" ></script>
    <script type="text/javascript" src="@Url.Content("~/Content/cssFrontEnd/js/load.js")" ></script>
    <script type="text/javascript" src="@Url.Content("~/Content/cssFrontEnd/js/styles.js")" ></script>
    <script type="text/javascript" src="@Url.Content("~/Content/cssFrontEnd/js/jquery.nicescroll.min.js")" ></script>
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
   
}

 <script type="text/javascript">
     document.body.className = 'no-js';
     $(document).ready(function () {
         latlng = new google.maps.LatLng("@Model.KinhDo", "@Model.ViDo");
         image = 'images/icon-pin-map.png';
         var myOptions = {
             zoom: 17,
             center: latlng,
             scrollwheel: true,
             mapTypeId: google.maps.MapTypeId.ROADMAP,
             panControl: false,
             zoomControl: true,
             mapTypeControl: true,
             mapTypeControlOptions: {
                 style: google.maps.MapTypeControlStyle.DROPDOWN_MENU,
                 position: google.maps.ControlPosition.RIGHT_TOP
             },
             streetViewControl: false
         };
         var map = new google.maps.Map(document.getElementById("maps"), myOptions);
         var beachMarker = new google.maps.Marker({
             position: latlng,
             map: map,
             icon: ""
         });
     });
     function LienHe() {
         var image = $('#userAvatar').val();
         image = "/Content/Images/Avatar/" + image;
        // alert(image);
         var UserName = $('#userId').val();
         var Contents = document.getElementById("appendedInputButton").value;
         if (Contents == "") {
             $('#MatKhauError').text('Vui lòng nhập nội dung');
             $('#frmERROR').modal('show');
             return false;
         }
         var getURL = '@Url.Action("InsertAdminSupport", "NSiteInfo")';
         $.get(getURL, { "UserName": UserName, "Contents": Contents }, function (data) {
             if (data == "ok") {
                 $("div#ChatBoxAdmin").append("<div class=" + "it receive" + "><div class=" + "avatar" + "><img src=" + image + " /></div> <div class=" + "textWrap" + "><div class=" + "textInner" + ">" + Contents + "</div></div></div>");
             }
             else {
                 $('#MatKhauError').text('Tin nhắn lỗi');
                 $('#frmERROR').modal('show');
             }

         });

         return false;
     }
 </script>